Skip to main content
POST
`POST /v1/auth/magic/mint` — internal endpoint the bot calls when a user runs `/web`. Authenticates via `x-internal-secret` (constant-time compare against `BOT_INTERNAL_SECRET`). Inserts a fresh nonce row and returns it. No JWT is issued here — that happens on consume.

Headers

x-internal-secret
string
required

Shared secret (BOT_INTERNAL_SECRET); bot-only, not a user bearer token

Body

application/json
telegram_id
integer<int64>
required

Response

Fresh magic-link nonce

expires_at
string<date-time>
required
nonce
string
required